package org.csmz.class2334;

import java.util.Scanner;

public class Example13 {

    public static void main(String[] args){

        String password = "123456";
        String input;

        do{
            System.out.println("请输入密码：");
            Scanner scanner = new Scanner(System.in);
            input = scanner.nextLine();
            if(!input.equals(password)){
                System.out.println("密码不对，请重新输入");
            }
        }while (!password.equals(input));
        System.out.println("密码正确");
    }

}